<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算出圆的半径和面积</title>
</head>
<body>

<input type="text" placeholder="半径" id="a">
<input type="text" placeholder="周长" id="b">
<input type="text" placeholder="面积" id="c">


<script>
//    var pai = Math.PI;
    var p=Number(prompt("请输入半径"));
    document.querySelector("#a").value = p;
    console.log(typeof p);
    var r = 2*Math.PI*p;
    document.querySelector("#b").value = r;
    console.log(typeof r);
    var m = Math.PI*p*p;
    document.querySelector("#c").value = m;
    console.log(typeof m);




</script>

</body>
</html>